package com.example.floatingpopulation.mapper;

import com.example.floatingpopulation.controller.dto.forgetPasswordDTO;
import com.example.floatingpopulation.controller.request.BaseRequest;
import com.example.floatingpopulation.controller.request.LoginRequest;
import com.example.floatingpopulation.controller.request.RegisterRequest;
import com.example.floatingpopulation.entity.Admin;
import com.example.floatingpopulation.entity.Password;
import com.example.floatingpopulation.entity.Permissions;
import com.example.floatingpopulation.entity.User;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {
//    @Select("select * from user")
    List<User> list();

    List<User> listByCondition(BaseRequest baseRequest);

    void save(User user);

    void updateById(User user);

    void deleteById(Integer id);

    User getByidCardAndPassword(LoginRequest request);


    Permissions getPermissions(String isAdmin);

    User getById(Integer id);

    void resetPassword(User user);

    void updatePassword(Password password);

    Boolean register(RegisterRequest request);

    void updatePasswordForget(forgetPasswordDTO dto);
}
